<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema"
    xmlns:ogc="http://www.opengis.net/ogc" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd
      http://www.opengis.net/ogc http://schemas.opengis.net/filter/1.1.0/expr.xsd">
    <namespaces>
        <Namespace>
            <prefix>test</prefix>
            <uri>http://www.geotools.org/test</uri>
        </Namespace>
        <Namespace>
            <prefix>gml</prefix>
            <uri>http://www.opengis.net/gml/3.2</uri>
        </Namespace>
        <Namespace>
            <prefix>xlink</prefix>
            <uri>http://www.w3.org/1999/xlink</uri>
        </Namespace>
    </namespaces>
    <sourceDataStores>
        <DataStore>
            <id>subgrpcoverage</id>
            <parameters>
                <Parameter>
                    <name>directory</name>
                    <value>file:./</value>
                </Parameter>
            </parameters>
        </DataStore>
    </sourceDataStores>
    <targetTypes>
        <FeatureType>
            <schemaUri>subgrp.xsd</schemaUri>
        </FeatureType>
    </targetTypes>
    <typeMappings>
        <FeatureTypeMapping>
            <mappingName>subgrpcoverage</mappingName>
            <sourceDataStore>subgrpcoverage</sourceDataStore>
            <sourceType>subgrpcoverage</sourceType>
            <targetElement>test:DiscreteCoverage</targetElement>
            <isDenormalised>false</isDenormalised>
            <attributeMappings>
                <AttributeMapping>
                    <targetAttribute>test:DiscreteCoverage</targetAttribute>
                    <idExpression>
                        <OCQL>uuid</OCQL>
                    </idExpression>
                    <targetAttributeNode>test:DiscreteCoverageType</targetAttributeNode>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>gml:identifier</targetAttribute>
                    <sourceExpression>
                        <OCQL>'http://www.geoserver.org/contour'</OCQL>
                    </sourceExpression>
                    <ClientProperty>
                        <name>codeSpace</name>
                        <value>'urn:ietf:rfc:1738'</value>
                    </ClientProperty>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>test:domainSet</targetAttribute>
                    <targetAttributeNode>test:DomainSetType</targetAttributeNode>
                    <encodeIfEmpty>true</encodeIfEmpty>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>test:domainSet/test:DomainObject</targetAttribute>
                    <idExpression>
                        <OCQL>strConcat(uuid,'-domainObjectId')</OCQL>
                    </idExpression>
                    <targetAttributeNode>test:DomainObjectType</targetAttributeNode>
                    <encodeIfEmpty>true</encodeIfEmpty>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>test:domainSet/test:DomainObject/test:elements</targetAttribute>
                    <targetAttributeNode>test:SpatioTemporalElementsPropertyType</targetAttributeNode>
                    <encodeIfEmpty>true</encodeIfEmpty>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>test:domainSet/test:DomainObject/test:elements/gml:MultiCurve</targetAttribute>
                    <idExpression>
                        <OCQL>strConcat(uuid,'-geomId')</OCQL>
                    </idExpression>
                    <sourceExpression>
                        <OCQL>geom</OCQL>
                    </sourceExpression>
                    <encodeIfEmpty>true</encodeIfEmpty>
                    <ClientProperty>
                        <name>srsName</name>
                        <value>'http://www.opengis.net/def/crs/EPSG/0/4052'</value>
                    </ClientProperty>
                    <ClientProperty>
                        <name>axisLabels</name>
                        <value>'latitude longitude'</value>
                    </ClientProperty>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>test:domainSet/test:DomainObject/test:elements/gml:Point</targetAttribute>
                    <idExpression>
                        <OCQL>strConcat(uuid,'-geom2Id')</OCQL>
                    </idExpression>
                    <sourceExpression>
                        <OCQL>geom2</OCQL>
                    </sourceExpression>
                    <ClientProperty>
                        <name>srsName</name>
                        <value>'http://www.opengis.net/def/crs/EPSG/0/4052'</value>
                    </ClientProperty>
                    <ClientProperty>
                        <name>axisLabels</name>
                        <value>'latitude longitude'</value>
                    </ClientProperty>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>gml:rangeSet/gml:ValueArray</targetAttribute>
                    <idExpression>
                        <OCQL>strConcat(uuid,'-valueArrayId')</OCQL>
                    </idExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>gml:rangeSet/gml:ValueArray/gml:valueComponents/gml:Quantity</targetAttribute>
                    <sourceExpression>
                        <OCQL>amount</OCQL>
                    </sourceExpression>
                    <ClientProperty>
                        <name>uom</name>
                        <value>amount_uom</value>
                    </ClientProperty>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>gml:coverageFunction/gml:CoverageMappingRule/gml:ruleDefinition</targetAttribute>
                    <sourceExpression>
                        <OCQL>rule</OCQL>
                    </sourceExpression>
                </AttributeMapping>
            </attributeMappings>
        </FeatureTypeMapping>
    </typeMappings>
</as:AppSchemaDataAccess>